#pragma once 
#include <iostream>
#include <string>
#include <unistd.h>

using namespace std;

class Channel
{
public:
    Channel(int wfd, pid_t subid, string subname)
        :_wfd(wfd),_subid(subid),_subname(subname)
    { 
    }

    int Wfd() {return _wfd;}
    pid_t Id() {return _subid;}
    string Name() {return _subname;}

    void Close() 
    {
        close(_wfd);
    }

    ~Channel()
    {}

private:
    int _wfd;
    pid_t _subid;
    string _subname;
};